#!/usr/bin/env python3
# -*- coding: utf-8 -*-

#' a test module '

__author__ = 'Cater xy'

import os
import py.message
from flask import Flask, request, url_for,render_template
from datetime import datetime
app = Flask(__name__)

@app.route('/')

def index():
    return render_template('index.html')


@app.route('/favicon.ico')
def ico():
    return url_for('static', filename='favicon.ico')

@app.route('/nice',methods=['GET','POST'])
def hello_world():
    if request.method == 'POST':
        return(py.message.Message(request.data))


if __name__ == '__main__':
    app.run(host='0.0.0.0',port=80)
